<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="layouts::header"></head>

<body>
<nav th:replace="layouts::navbar"></nav>
<div class="container">
    <form th:action="@{/interactions/save}" th:object="${interaction}"  method="POST">
        <!--用于更新评论时获得被点击的评论的ID-->
        <input type="hidden" th:field="${interaction.interactionId}">
        <input type="text" placeholder="昵称" th:field="*{username}">
        <input type="text" placeholder="发布者ID" th:field="*{unitId}">
        <input type="text" placeholder="评论标题并选中" th:field="*{title}">

        <select th:field="*{forums}" multiple="multiple">
            <option th:each="forum : ${allForums}" th:value="${forum.unitId}" th:text="${forum.title}"></option>


        </select>
        <textarea type="text" placeholder="评论" th:field="${interaction.comment}"></textarea>

        <button type="submit">新建动态评论</button>
    </form>
</div>
</body>
</html>